function judge(text) {
  const pattern = /^[\u4e00-\u9fa5A-Za-z1-9_]{6,8}$/;
  return pattern.test(text);
}

console.log(judge("中国富强民主"));
console.log(judge("helloxx"));
console.log(judge("hello "));
console.log(judge("a123456"));
